package com.zjut.an.role.manager;

import java.util.List;

import javax.annotation.Resource;

import com.zjut.an.news.dao.AnNews;
import com.zjut.an.news.dao.AnNewsDAO;
import com.zjut.an.role.dao.AnRole;
import com.zjut.an.role.dao.AnRoleDAO;
import com.zjut.an.util.module.PageModule;
import com.zjut.an.webclass.dao.AnWebclass;
import com.zjut.an.webclass.dao.AnWebclassDAO;


public class AnRoleManager {

	@Resource(name = "AnRoleDAO")
	private AnRoleDAO dao;
	
	public void addData(AnRole obj) {	
		dao.save(obj);
	}
	
	public void updateData(AnRole obj) {
		dao.update(obj);
	}
	
	public void deleteData(AnRole obj) {
		dao.delete(obj);
	}

	public void deleteDatas(List<AnRole> objllegeList) {
		for (AnRole AnRole : objllegeList) {
			dao.delete(AnRole);
		}
	}
	
	public List getDatas() {
		return dao.findAll();
	}

	public AnRole getData(int objId) {
		return dao.findById(objId);
	}
}
